package vipcn.interview.hashcode;

import java.util.ArrayList;

public class HashCodeTest {
	public static void main(String[] args) {
		ArrayList list = new ArrayList<>();
		for (int a = 0; a < 1000000; a++) {
			list.add(String.valueOf(a));
		}
		String b = "999999";
		long statTime = System.currentTimeMillis();
		long endTime = 0;
		for (int a = 0; a < 1000000; a++) {
			if (b.equals(String.valueOf(a))) {
				endTime = System.currentTimeMillis();
				break;
			}
		}
		System.out.println((endTime - statTime));
		String c = "999999";
		long statTime2 = System.currentTimeMillis();
		long endTime2 = 0;
		for (int a = 0; a < 1000000; a++) {
			if (c == String.valueOf(a)) {
				endTime2 = System.currentTimeMillis();
				break;
			}
		}

		System.out.println(endTime2 - statTime2);
	}
}
